std::basic_istream::ignore

From Cppreference

Jump to: navigation, search
​basic_istream& ignore();
(1)
​basic_istream& ignore( pos_type count );
(2)
​basic_istream& ignore( pos_type count, char_type delim );
(3)

Extracts and discards characters from the input stream. For all versions if ​good() != true, ​setstate(failbit) is called and the function returns. If end-of-file occurs, ​setstate(eofbit) is called and the function returns.

1) ignores and discards one character

2) ignores and discards up to count characters

3) ignores and discards up to count characters. The operation is stopped when delim character is found in which case it is also extracted

Contents

Parameters

count - number of characters to extract
delim - delimiting character to stop the extraction at. It is also extracted.

Return value

*this​

Example

See also

get
extracts characters
(public member function)
getline
extracts characters until the given character is found
(public member function)
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages